﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCDto.Utils;
using BCCommon.Enums;
using BCCommon;

namespace BCDto.Common.DictionaryCategory
{
    /// <summary>
    /// 字典分类
    /// </summary>
    public class DictionaryCategoryRequestDto
    {
        /// <summary>
        /// 分类编码
        /// </summary>		
        [Display(Name = "分类编码")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [RegularExpression(RegexPatterns.DICTIONAY_CATEGORY_CODE,ErrorMessage = "分类编码格式不正确,仅支持英文单词和下划线，不支持其他字符,格式规定:系统类型名称_名称描述词")]
        public string CategoryCode { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>		
        [Display(Name = "分类名称")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(30, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string CategoryName { get; set; }
        /// <summary>
        /// 分类图标
        /// </summary>		
        [Display(Name = "分类图标")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [Image(new string[] { "png"})]
        public string CategoryIcon { get; set; }
        /// <summary>
        /// 父级字典分类Id
        /// </summary>		
        [Display(Name = "父级字典分类Id")]
        public long? ParentDictionaryCategoryId { get; set; }
        /// <summary>
        /// 系统类型
        /// </summary>		
        [Display(Name = "系统类型")]
        public BCSystemType SystemType { get; set; }
    }
}

